package edu.java.lectures.lec09.exceptions.abstraction;

import edu.java.lectures.lec09.exceptions.creation.MyException;
import edu.java.lectures.lec09.exceptions.creation.MySubException;

public abstract class MyAbstractClass implements MyInterface {

    @Override
    public void doSomething1() throws MyException {
	throw new MyException("Alabala");
    }

    // restricting the exception type
    @Override
    public abstract void doSomething2() throws MySubException;

    // Leave the implementation to the sub-classes
    // public abstract void doSomething3() throws MyException;

    // removing the restriction over the exceptions
    @Override
    public abstract void doSomething4();

    @Override
    public void doSomething5() {
	System.out.println("Do something 5.");
    }
}
